package com.fei.yygh.hosp.controller;


import com.fei.yygh.hosp.service.HospitalService;
import com.fei.yygh.model.hosp.Hospital;
import com.fei.yygh.result.Result;
import com.fei.yygh.vo.hosp.HospitalQueryVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/admin/hosp/hospital")
@CrossOrigin
public class HospitalController {
    @Autowired
    private HospitalService hospitalService;

    //医院列表
    @GetMapping("list/{page}/{limit}")
    public Result limitHosp(@PathVariable int page, @PathVariable int limit, HospitalQueryVo hospitalQueryVo) {

      Page pageModel = hospitalService.selectHosPage(page,limit,hospitalQueryVo);
      return Result.ok(pageModel);


    }
}
